<template>
  <div class="index__ad">
    <div class="swiper-containerTwo">
      <div class="swiper-wrapper">
        <div class="swiper-slide"
             v-for="item of ad"
             :key="item.id"
        >
          <img :src="item.url" alt="">
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import Swiper from 'swiper'
import 'swiper/dist/css/swiper.min.css'
export default {
  name: 'IndexSwiper',
  props: {
    ad: Array
  },
  mounted () {
    /* eslint-disable */
    new Swiper('.swiper-containerTwo', {
      pagination: {
        el: 'null'
      },
      observer: true,
      observeParents: true,
    })
  }
}
</script>

<style scoped>
  .index__ad {
    overflow: hidden;
    height: 0;
    padding-bottom: 29.33%;
    margin: 20px 0;
  }
  .swiper-slide img {
      width: 100%;
    }
</style>
